package cn.wsn2018.tools.util;

import cn.wsn2018.tools.common.CommonValue;

import java.util.HashMap;

/**
 * @program: tools
 * @description 匹配用户角色
 * @author: songDaisong
 * @create: 2019-12-13 20:55
 **/
public class RoleUtil {

    public static final HashMap<String,String> roleHashMap=new HashMap<String,String>(){
        {
            put(CommonValue.ROLE_ADMIN,"系统管理员");
            put(CommonValue.ROLE_AUDITOR,"审计员");
            put(CommonValue.ROLE_OPERATOR,"操作员");
        }
    };

    public static String getRoleName(String roleName){
        //匹配角色，都转换为小写
        return roleHashMap.get(roleName.toLowerCase());
    }
}
